package com.macro.mall.vo;

import com.macro.mall.common.utils.IsNeeded;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author super
 * @title: UserImportVO
 * @description: TODO
 * @date 2020/11/16 12:15
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserImportVO implements Serializable {

    //真实姓名	手机号	身份证	类型(下拉选择)	省	市	区县	社区	楼号	昵称(默认为手机号)	密码	生日	性别

    @IsNeeded
    @ApiModelProperty(value = "姓名", required = false, position = 3)
    private String name;
    @IsNeeded
    @ApiModelProperty(value = "手机号码")
    private String phone;
    @IsNeeded
    @ApiModelProperty(value = "身份证号码", required = false, position = 4)
    private String idCard;
    @IsNeeded
    @ApiModelProperty(value = "用户类型 01-服务 02-学院类 03-服务、学院")
    private String userType;
    @IsNeeded
    @ApiModelProperty(value = "省份", required = false, position = 5)
    private String province;
    @IsNeeded
    @ApiModelProperty(value = "所在城市", required = false, position = 6)
    private String city;
    @IsNeeded
    @ApiModelProperty(value = "区", required = false, position = 7)
    private String area;
    @ApiModelProperty(value = "社区标识")
    private String communityId;
    @IsNeeded
    @ApiModelProperty(value = "社区名称")
    private String communityName;
    @IsNeeded
    @ApiModelProperty(value = "楼号", required = false, position = 8)
    private String floor;
    @IsNeeded
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @IsNeeded
    @ApiModelProperty(value = "密码")
    private String password;
    @IsNeeded
    @ApiModelProperty(value = "生日")
    private String birthday;
    @IsNeeded
    @ApiModelProperty(value = "性别：0->未知；1->男；2->女")
    private String gender;

    @ApiModelProperty(value = "帐号启用状态:0->禁用；1->启用")
    private Integer status = 1;

    @IsNeeded
    @ApiModelProperty(value = "用户身份 01-居民 02-居委会 03-物业公司 04-业委会 05-物管会 06-管理员 07-供应商 08-政府组织 09-其他", required = false, position = 9)
    private String userIdentity;

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        if("男".equals(gender.trim())) {
            this.gender = "1";
        } else {
            this.gender = "2";

        }
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        if("服务".equals(userType.trim())) {
            this.userType = "01";
        } else {
            this.userType = "02";
        }
    }


}
